﻿using CodeGenerator.Ado.Providers;

namespace CodeGenerator.Ado
{
    public class AdoFactory
    {
        public static AdoProviderBase GetProvider(DBType dataSourceType, string connectionString)
        {
            switch (dataSourceType)
            {
                case DBType.MSSQL:
                    return new SqlServerProvider(connectionString);
                case DBType.MySQL:
                    return new MySqlProvider(connectionString);
                default:
                    return null;
            }
        }
    }
}
